﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
@model sipfe.model.dataAccess.SIPMaePersona
@using Resources;
@using sipfe.util;
@{   
    Layout = "~/Views/Shared/Layaout/general/_LayoutPopGeneral.cshtml";        
}

<script type="text/javascript" language="javascript" src="@Url.Content(@properties.nuevoJS)" ></script>
<script type="text/javascript" language="javascript" src="@Url.Content(@properties.mantePersonaJS)" ></script>
<script type="text/javascript" language="javascript" src="@Url.Content(@properties.ajaxJS)" ></script>
<script type="text/javascript">
    $(function () {       
        calendarioFechaNac('dtFecNacim');
    });    
</script>
<br/>
@using (Html.BeginForm("AddPersonaNaturalPop", "MantePerson", FormMethod.Post))
{
 @Html.ValidationSummary(false, "Los Siguientes Campos son Obligatorios:")
<input type="hidden" name="swReg" value="@ViewBag.swReg" id="swReg" />
<fieldset style="width: 760px;" class="fieldsetStyle1">
    <legend class="tituloBlue9">Registrar Nueva Persona Natural</legend>
    <table border="0" style="width: 100%;" cellpadding="0" cellspacing="0">
        <tbody>
            <tr>                
                <td>
                    <table border="0" cellpadding="0" cellspacing="0" width="100%">
                    <tbody class="tituloCelesteN8">
                        <tr>
                            <td>País Emisor<span class="asterisco">(*)</span></td>
                            <td>Tipo documento<span class="asterisco">(*)</span></td>
                            <td>Número documento<span class="asterisco">(*)</span></td>                            
                            <td>Fecha Nacimiento<span class="asterisco">(*)</span></td>
                            <td>Género<span class="asterisco">(*)</span></td>
                        </tr>
                        <tr>
                            <td>@Html.DropDownListFor(model => model.nIdeCodPaisDoc, (IEnumerable<SelectListItem>)ViewBag.PaisEmisor, "--Seleccione--", new { @class = "select8", style = "width:127px;" })</td>
                            <td>@Html.DropDownListFor(model => model.nIdeTipoDocum, (IEnumerable<SelectListItem>)ViewBag.TipoDocIdent, "--Seleccione--", new { @class = "select8", style = "width:127px;"})</td>
                            <td>@Html.TextBoxFor(model => model.vNumDocum, new { @class = "textBoxMay", style = "width:120px;text-transform:none;", maxlength = 20, onkeypress = "return validaAlfaNumTamanio(this,event,20);", onpaste = "return false;", onblur = "javascript:onBlurUpper(this); javascript:validaDocumentoPersona(this,'1','1');" })</td>
                            <td>@Html.TextBoxFor(model => model.dtFecNacim, new { maxlength = 10, readOnly = true })</td>
                            <td>@Html.DropDownListFor(model => model.nIdeTipoGenero, (IEnumerable<SelectListItem>)ViewBag.Genero, "--Seleccione--", new { @class = "select8", style = "width:127px;" })</td>                            
                        </tr>
                        <tr>
                            <td>Primer nombre<span class="asterisco">(*)</span></td>
                            <td>Segundo nombre</td>
                            <td>Apellido paterno<span class="asterisco">(*)</span></td>
                            <td>Apellido materno<span class="asterisco">(*)</span></td>
                            <td>Estado civil<span class="asterisco">(*)</span></td>
                        </tr>
                        <tr>
                            <td>@Html.TextBoxFor(model => model.vPriNombre, new { style = "width:124px;", maxlength = 120, onblur = "javascript:onBlurUpper(this);" })</td>
                            <td>@Html.TextBoxFor(model => model.vSegNombre, new { style = "width:124px;", maxlength = 120, onblur = "javascript:onBlurUpper(this);" })</td>
                            <td>@Html.TextBoxFor(model => model.vPriApellido, new { style = "width:120px;", maxlength = 120, onblur = "javascript:onBlurUpper(this);" })</td>
                            <td>@Html.TextBoxFor(model => model.vSegApellido, new { style = "width:120px;", maxlength = 120, onblur = "javascript:onBlurUpper(this);" })</td>
                            <td>@Html.DropDownListFor(model => model.SIPDetEstadoCivil1.nIdeEstadoCivil, (IEnumerable<SelectListItem>)ViewBag.EstadoCivil, "--Seleccione--", new { @class = "select8" })</td>
                        </tr>
                        <tr>
                            <td>País nacimiento<span class="asterisco">(*)</span></td>
                            <td>Región nacimiento</td>
                            <td colspan="3" rowspan="2">
                                <table border="0" cellpadding="0" cellspacing="0" width="100%">
                                    <tr class="tituloCelesteN8">
                                        <td>Provincia</td>
                                        <td>Distrito</td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <div id="divProvinciasNac">
                                                <select id="nIdeProvNac" name="nIdeProvNac" style="width:200px;" >
                                                    <option value="">--Seleccione--</option>
                                                </select>
                                            </div>
                                        </td>
                                        <td>
                                            <div id="divDistritosNac">
                                                <select id="nIdeDistritoNac" name="nIdeDistritoNac" style="width:200px;" >
                                                    <option value="">--Seleccione--</option>
                                                </select>
                                            </div>
                                        </td>
                                    </tr>
                                </table>
                            </td>                           
                        </tr>
                        <tr>
                            <td>@Html.DropDownListFor(model => model.nIdePaisNac, (IEnumerable<SelectListItem>)ViewBag.PaisEmisor, "--Seleccione--", new { @class = "select8", style = "width:127px;" })</td>
                            <td>@Html.DropDownListFor(model => model.nIdeRegionNac, (IEnumerable<SelectListItem>)ViewBag.Regiones, "--Seleccione--", new { @class = "select8", style = "width:127px;", onchange = "javascript:cargaUbigeo(this,'1');" })</td>                                                       
                        </tr>                        
                        <tr>
                            <td>
                                <table border="0" cellpadding="0" cellspacing="0">
                                    <tr class="tituloCelesteN8" align="center">
                                        <td>Prefijo1</td>
                                        <td>&nbsp;</td>
                                        <td>Teléfono1</td>
                                    </tr>
                                    <tr class="tituloCelesteN8">
                                        <td>@Html.TextBoxFor(model => model.SIPDetTelefono1.vPrefijo, new { style = "width:40px;", maxlength = 6, onblur = "javascript:onBlurUpper(this);" })</td>
                                        <td>-</td>
                                        <td>@Html.TextBoxFor(model => model.SIPDetTelefono1.vNumTel, new { style = "width:80px;", maxlength = 20 , onblur = "javascript:onBlurUpper(this);"})</td>
                                    </tr>
                                </table>
                            </td>
                            <td>
                                <table border="0" cellpadding="0" cellspacing="0">
                                    <tr class="tituloCelesteN8" align="center">
                                        <td>Prefijo2</td>
                                        <td>&nbsp;</td>
                                        <td>Teléfono2</td>
                                    </tr>
                                    <tr class="tituloCelesteN8">
                                        <td>@Html.TextBoxFor(model => model.SIPDetTelefono2.vPrefijo, new { style = "width:40px;", maxlength = 6, onblur = "javascript:onBlurUpper(this);" })</td>
                                        <td>-</td>
                                        <td>@Html.TextBoxFor(model => model.SIPDetTelefono2.vNumTel, new { style = "width:80px;", maxlength = 20, onblur = "javascript:onBlurUpper(this);" })</td>
                                    </tr>
                                </table>
                            </td>
                            <td colspan="2">
                                <table border="0" cellpadding="0" cellspacing="0" width="100%">
                                    <tr class="tituloCelesteN8">
                                        <td>Correo electrónico</td>
                                    </tr>
                                    <tr class="tituloCelesteN8">
                                        <td>@Html.TextBoxFor(model => model.SIPDetCorreo1.vCorreo, new { style = "width:275px;text-transform:none;", maxlength = 145 })</td>                                       
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </tbody>
                    </table>
                </td>
            </tr>
        </tbody>
    </table>
</fieldset>   
    <br />
    <fieldset style="width: 760px;" class="fieldsetStyle1">
    <legend class="tituloBlue9">Registrar Nueva Dirección</legend>
    <table border="0" style="width: 100%;" cellpadding="0" cellspacing="0">
        <tbody>
            <tr>
                <td>
                    <table border="0" cellpadding="0" cellspacing="0" class="tituloCelesteN8">
                        <tr>
                            <td>Tipo de Vía <span class="asterisco">(*)</span></td>
                            <td style="width:10px;">&nbsp;</td> 
                            <td>Nombre de la Vía<span class="asterisco">(*)</span></td>
                            <td style="width:10px;">&nbsp;</td>
                            <td># Puerta</td>
                            <td>&nbsp;</td>                           
                            <td>Letra</td>
                        </tr>
                        <tr>
                            <td>@Html.DropDownListFor(model => model.SIPDetDireccion1.nIdeTipoVia, (IEnumerable<SelectListItem>)ViewBag.TipoVia, "--Seleccione--", new { @class = "select8", style = "width:127px;" })</td>                            
                            <td>&nbsp;</td>
                            <td>@Html.TextBoxFor(model => model.SIPDetDireccion1.vNomVia, new { @style = "width:280px;", maxlength = 300, ondblclick = "javascript:cleanBox(this);", onblur = "javascript:onBlurUpper(this);", onkeypress = "return validaAlfaNumTamanio(this, event, 300);" })</td>                            
                            <td>&nbsp;</td>                           
                            <td>@Html.TextBoxFor(model => model.SIPDetDireccion1.vNumPuerta, new { @style = "width:50px;", maxlength = 10, onkeypress = "return validarSoloNumeros(event);", ondblclick = "javascript:cleanBox(this);" })</td>                            
                            <td align="center">-</td>
                            <td>@Html.TextBoxFor(model => model.SIPDetDireccion1.vLetra, new { @style = "width:30px;", maxlength = 1, onkeypress = "return validarSoloLetras(event);", ondblclick = "javascript:cleanBox(this);", onblur = "javascript:onBlurUpper(this);" })</td>                           
                        </tr>
                    </table>
                </td>
            </tr>
            <tr><td>&nbsp;</td></tr>
            <tr>
                <td>
                    <table border="0" cellpadding="0" cellspacing="0" class="tituloCelesteN8">
                        <tr>
                            <td>Tipo de Zona<span class="asterisco">(*)</span></td>
                            <td style="width:10px;">&nbsp;</td> 
                            <td>Nombre de la Zona<span class="asterisco">(*)</span></td>                            
                            <td style="width:10px;">&nbsp;</td>                          
                            <td>Centro Poblado</td>
                        </tr>
                        <tr>                           
                           <td>@Html.DropDownListFor(model => model.SIPDetDireccion1.nIdeTipoZona, (IEnumerable<SelectListItem>)ViewBag.TipoZona, "--Seleccione--", new { @class = "select8" })</td>
                           <td>&nbsp;</td>
                           <td>@Html.TextBoxFor(model => model.SIPDetDireccion1.vNomZona, new { @style = "width:280px;", maxlength = 300, ondblclick = "javascript:cleanBox(this);", onblur = "javascript:onBlurUpper(this);", onkeypress = "return validaAlfaNumTamanio(this, event, 300);" })</td>
                           <td>&nbsp;</td>
                           <td>@Html.TextBoxFor(model => model.SIPDetDireccion1.vCenPoblado, new { @style = "width:293px;", maxlength = 200, ondblclick = "javascript:cleanBox(this);", onblur = "javascript:onBlurUpper(this);", onkeypress = "return validaAlfaNumTamanio(this, event, 200);" })</td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr><td>&nbsp;</td></tr>
            <tr>
                <td>
                    <table border="0" cellpadding="0" cellspacing="0" style="width:100%;" class="tituloCelesteN8">
                        <tr>
                            <td style="width:40px;">Block</td>
                            <td style="width:40px;">Piso</td>
                            <td style="width:60px;">Interior</td>
                            <td style="width:60px;">Manzana</td>
                            <td style="width:60px;">Lote</td>
                            <td style="width:70px;">Kilometro</td>
                            <td>Referencia</td>
                        </tr>
                        <tr>
                            <td>@Html.TextBoxFor(model => model.SIPDetDireccion1.vNumBlock, new { @style = "width:30px;", maxlength = 10, ondblclick = "javascript:cleanBox(this);", onblur = "javascript:onBlurUpper(this);", onkeypress = "return validaAlfaNumTamanio(this, event, 10);" })</td>
                            <td>@Html.TextBoxFor(model => model.SIPDetDireccion1.vPiso, new { @style = "width:30px;", maxlength = 10, ondblclick = "javascript:cleanBox(this);", onblur = "javascript:onBlurUpper(this);", onkeypress = "return validaAlfaNumTamanio(this, event, 10);" })</td>
                            <td>@Html.TextBoxFor(model => model.SIPDetDireccion1.vInterior, new { @style = "width:30px;", maxlength = 10, ondblclick = "javascript:cleanBox(this);", onblur = "javascript:onBlurUpper(this);", onkeypress = "return validaAlfaNumTamanio(this, event, 10);" })</td>
                            <td>@Html.TextBoxFor(model => model.SIPDetDireccion1.vManzana, new { @style = "width:40px;", maxlength = 10, ondblclick = "javascript:cleanBox(this);", onblur = "javascript:onBlurUpper(this);", onkeypress = "return validaAlfaNumTamanio(this, event, 10);" })</td>
                            <td>@Html.TextBoxFor(model => model.SIPDetDireccion1.vLote, new { @style = "width:40px;", maxlength = 10, ondblclick = "javascript:cleanBox(this);", onblur = "javascript:onBlurUpper(this);", onkeypress = "return validaAlfaNumTamanio(this, event, 10);" })</td>
                            <td>@Html.TextBoxFor(model => model.SIPDetDireccion1.vKilometro, new { @style = "width:40px;", maxlength = 10, ondblclick = "javascript:cleanBox(this);", onblur = "javascript:onBlurUpper(this);", onkeypress = "return validaAlfaNumTamanio(this, event, 10);" })</td>
                            <td>@Html.TextAreaFor(model => model.SIPDetDireccion1.vRefer, new { @style = "width:420px;", rows = 2, maxlength = 300, ondblclick = "javascript:cleanBox(this);", onblur = "javascript:onBlurUpper(this);", onkeypress = "return validaAlfaNumTamanio(this, event, 300);" })</td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr><td>&nbsp;</td></tr>
            <tr>
                <td>
                    <table border="0" cellpadding="0" cellspacing="0" style="width:760px;" class="tituloCelesteN8">
                        <tr>                           
                            <td>Región / Departamento<span class="asterisco">(*)</span></td>
                            <td>Provincia<span class="asterisco">(*)</span></td>
                            <td>Distrito<span class="asterisco">(*)</span></td>
                        </tr>
                        <tr>                          
                           <td>@Html.DropDownListFor(model => model.SIPDetDireccion1.nIdeDpto, (IEnumerable<SelectListItem>)ViewBag.Regiones, "--Seleccione--", new { @class = "select8", style = "width:200px;", onchange = "javascript:cargaUbigeo(this,'5');" })</td>
                           <td>
                                <div id="divProvincias">
                                    <select id="nIdeProvDir" name="nIdeProvDir"  style="width:200px;" >
                                        <option value="">--Seleccione--</option>
                                    </select>
                                </div>
                            </td>
                            <td>
                                <div id="divDistritos">
                                    <select id="nIdeDistritoDir" name="nIdeDistritoDir" style="width:200px;" >
                                        <option value="">--Seleccione--</option>
                                    </select>
                                </div>
                            </td> 
                        </tr>
                    </table>
                </td>
            </tr>            
        </tbody>
    </table>
</fieldset>
    <table border="0" cellpadding="10" cellspacing="0" style="width:80%;">
        <tr align="center">
            <td width="30%"><b>Campo Obligatorio:</b>&nbsp;<span class="asterisco">(*)</span></td>
            <td width="70%"><input type="button" value="Registrar Datos" onclick="javascript: addPersonaNaturalPopFinal(this.form);" /></td>
        </tr>
    </table> 
    @Html.Hidden("nIdeTipoPer", Constante.getInstance().N_IDE_DETALLE_TIPO_PERSONA_INTERNA)
    @Html.Hidden("nIdeUsuReg", @Session[Constante.N_IDE_USUARIO])
    @Html.Hidden("dtFecReg", @DateTime.Now.ToString())
    @Html.Hidden("dFecIniVig", @DateTime.Now.ToString())

    @Html.Hidden("SIPDetEstadoCivil1.dFecIniVig", @DateTime.Now.ToString())
    @Html.Hidden("SIPDetEstadoCivil1.nIdeUsuReg", @Session[Constante.N_IDE_USUARIO])
    @Html.Hidden("SIPDetEstadoCivil1.dtFecReg", @DateTime.Now.ToString())    
    
    @Html.Hidden("SIPDetDireccion1.nIdeUsuReg", @Session[Constante.N_IDE_USUARIO])
    @Html.Hidden("SIPDetDireccion1.dtFecReg", @DateTime.Now.ToString())
    @Html.Hidden("SIPDetDireccion1.dFecIniVig", @DateTime.Now.ToString())
    
    @Html.Hidden("SIPDetTelefono1.nIdeUsuReg", @Session[Constante.N_IDE_USUARIO])
    @Html.Hidden("SIPDetTelefono1.dFecIniVig", @DateTime.Now.ToString())
    @Html.Hidden("SIPDetTelefono1.dtFecReg", @DateTime.Now.ToString())

    @Html.Hidden("SIPDetTelefono2.nIdeUsuReg", @Session[Constante.N_IDE_USUARIO])
    @Html.Hidden("SIPDetTelefono2.dFecIniVig", @DateTime.Now.ToString())
    @Html.Hidden("SIPDetTelefono2.dtFecReg", @DateTime.Now.ToString())

    @Html.Hidden("SIPDetCorreo1.nIdeUsuReg", @Session[Constante.N_IDE_USUARIO])
    @Html.Hidden("SIPDetCorreo1.dFecIniVig", @DateTime.Now.ToString())
    @Html.Hidden("SIPDetCorreo1.dFecReg", @DateTime.Now.ToString())        
}